package com.example.mall.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 统一错误码以及描述定义
 * @Author Raymon
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum ErrorEnumCode {
    /*********************以下为系统默认提供的一些异常错误代码********************/
    SUCCESS(0, "操作成功"),
    UNKNOWN_ERROR(-1, "未知错误"),
    INVALID_PARAM(1, "参数错误"),
    DB_ERROR(2, "数据库错误"),
    PARAM_IS_EMPTY(3, "参数不能为空"),
    SERVICE_INVALIDED(4, "当前服务不可用"),
    /*******************common异常,统一使用1000x*************************/
    COMMON_PHONE_EMPTY(10001, "手机号不能为空！"),
    COMMON_SMS_CODE_QUICKLY(10002, "请不要频繁发送验证码"),
    COMMON_PHONE_FORMAT_ERROR(10003, "手机号格式不正确"),
    COMMON_SMS_CODE_ERROR(10004, "验证码错误,请重新获取"),
    COMMON_IMAGE_CODE_ERROR(10005, "图形验证码错误"),
    COMMON_IMAGE_CODE_TIMEOUT(10006, "图形验证码超时"),
    COMMON_IMAGE_CODE_EMPTY(10007, "图形验证码不能为空"),
    COMMON_IMAGE_CODE_KEY_EMPTY(10008, "无效的图片验证码，请刷新重试或联系管理员"),
    SMS_SENDING_FAILED(10009, "短信发送失败"),

    /*******************user异常,统一使用2000x*************************/
    USER_PHONE_REGISTERED(20001, "手机号已注册"),
    /*******************course异常,统一使用3000x*************************/

    /*******************pay异常,统一使用4000x*************************/
    PAY_MQ_QUEUE_FAIL(40001, "支付结果，事务消息发送到订单队列失败"),

    MESSAGE_PUSH_FAILED(40005,"消息推送失败"),


    LOGINID_NOT_ID(100001,"登录唯一标识不能为空" ),
    PERMISSIONID_NOT_ID(100002,"登录权限唯一标识不能为空"),
    ROLEID_NOT_ID(100003,"登录角色唯一标识不能为空"),
    ROLEPREMISSIONID_NOT_ID(100004, "角色权限唯一标识不能为空"),
    USERROLEID_NOT_ID(100005, "用户角色唯一标识不能为空"),
    ACTIVITYID_NOT_ID(100006, "优惠券活动唯一标识不能为空"),
    RELATIONID_NOT_ID(100007, "优惠券适用商品唯一标识不能为空"),
    RECEIVEID_NOT_ID(100008, "优惠券领取记录唯一标识不能为空"),
    TEMPLATEID_NOT_ID(100009, "优惠券模板唯一标识不能为空"),
    USAGEID_NOT_ID(100010,"优惠券使用记录唯一标识不能为空" ),
    ALERTID_NOT_ID(100011, "库存预警唯一标识不能为空"),
    AUDITID_NOT_ID(100012, "库存盘点唯一标识不能为空"),
    LOCKID_NOT_ID(100013,"库存锁定记录唯一标识不能为空"),
    INVENTORYID_NOT_ID(100014," 商品库存唯一标识不能为空" ),
    RULEID_NOT_ID(100015,"包邮规则唯一标识不能为空"),
    CAMPANYID_NOT_ID(100016,"物流公司唯一标识不能为空" ),
    LOGISTICSFEERULESID_NOT_ID(100017,"物流费用规则唯一标识不能为空" ),
    LOGISTICSID_NOT_ID(100018, "物流单号唯一标识不能为空"),
    HISTORYID_NOT_ID(100019, "物流状态历史表唯一标识不能为空"),
    LEVELID_NOT_ID(100020,"会员等级唯一标识不能为空" ),
    ADDRESSID_NOT_ID(100021,"用户地址唯一标识不能为空" ),
    USERID_NOT_ID(100022,"用户基本信息唯一标识不能为空" ),
    USERCOUPONID_NOT_ID(100023,"用户优惠券唯一标识不能为空" ),
    FEEDBACKID_NOT_ID(100024, "用户反馈表唯一标识不能为空"),
    MEMBERSHIPID_NOT_ID(100025," 用户会员唯一标识不能为空" ),
    POINTID_NOT_ID(100026, "用户积分唯一标识不能为空"),
    ERRORID_NOT_ID(100027, " 错误日志表唯一标识不能为空"),
    OPERATIONID_NOT_ID(100028,"操作日志唯一标识不能为空" ),
    PERFORMANCEID_NOT_ID(100029, " 性能日志表唯一标识不能为空"),
    LOGID_NOT_ID(100030, "系统日志表唯一标识不能为空"),
    EMAILID_NOT_ID(100031, "邮件通知表唯一标识不能为空"),
    TYPEID_NOT_ID(100032, "消息类型表唯一标识不能为空"),
    RECEIVEDID_NOT_ID(100033, "接收消息表唯一标识不能为空"),
    SENTID_NOT_ID(100034, "发送消息表唯一标识不能为空"),
    MESSAGEID_NOT_ID(100035, "站内消息表唯一标识不能为空"),
    SMSID_NOT_ID(100036, "短信通知表唯一标识不能为空"),
    RECOMMENDID_NOT_ID(100037, "热门商品推荐表唯一标识不能为空"),
    DELISTID_NOT_ID(100038, "商品下架记录表唯一标识不能为空"),
    REVIEWID_NOT_ID(100039, "商品审核表唯一标识不能为空"),
    SECKILL_ACTIVITYID_NOT_ID(100040, "秒杀活动唯一标识不能为空"),
    SECKILLID_NOT_ID(100041, "秒杀商品唯一标识不能为空"),
    SPENDING_REDUCTION_ACTIVITYID_NOT_ID(100042, "满减活动唯一标识不能为空"),
    DISCOUNTID_NOT_ID(100043, "限时折扣唯一标识不能为空"),
    USER_PERSONALIZED_RECOMMENDID_NOT_ID(100044, "用户个性化推荐表唯一标识不能为空"),
    ORDER_ADDRESSID_NOT_ID(100045, "订单地址唯一标识不能为空"),
    ORDERID_NOT_ID(100046, "订单主表唯一标识不能为空"),
    DETAILID_NOT_ID(100047, "订单明细表唯一标识不能为空"),
    EXCEPTIONID_NOT_ID(100048, "订单异常处理表唯一标识不能为空"),
    PAYMENTID_NOT_ID(100049, "订单支付记录表唯一标识不能为空"),
    REFUNDID_NOT_ID(100050, "订单退款表唯一标识不能为空"),
    SHIPMENTID_NOT_ID(100051, "订单物流表唯一标识不能为空"),
    ALIPAY_INFO_NOT_ID(100052, "支付宝支付信息唯一标识不能为空"),
    PAY_FLOW_NOT_ID(100053, "支付流水表唯一标识不能为空"),
    CALLBACKID_NOT_ID(100054, "支付回调记录表唯一标识不能为空"),
    METHODID_NOT_ID(100055, "支付方式表唯一标识不能为空"),
    PLATFORMID_NOT_ID(100056, "支付平台表唯一标识不能为空"),
    PAYMENT_RECORDS_NOT_ID(100057, "支付记录表唯一标识不能为空"),
    PAYMENT_SECURITY_LOGS_NOT_ID(100058, "支付安全记录表唯一标识不能为空"),
    PAY_ORDER_NOT_ID(100059, "支付订单表唯一标识不能为空"),
    CATEGORYID_NOT_ID(100060, "商品分类表唯一标识不能为空"),
    IMAGEID_NOT_ID(100061, "商品图片表唯一标识不能为空"),
    PRODUCT_INVENTORYID_NOT_ID(100062, "商品库存表唯一标识不能为空"),
    PROMOTIONID_NOT_ID(100063, "商品促销活动表唯一标识不能为空"),
    PRODUCTID_NOT_ID(100064, "商品基本信息表唯一标识不能为空"),
    SPECID_NOT_ID(100065, "商品规格表唯一标识不能为空"),
    CONFIGID_NOT_ID(100066, "防作弊配置表唯一标识不能为空"),
    TRANSACTION_ALERTID_NOT_ID(100067, "异常交易报警表唯一标识不能为空"),
    MONITORID_NOT_ID(100068, "交易风险监控表唯一标识不能为空"),
    RECORDID_NOT_ID(100069, "用户下单记录表唯一标识不能为空"),
    STATID_NOT_ID(100070, "用户访问量统计表唯一标识不能为空"),
    USER_RETENTION_STATID_NOT_ID(100071, "用户留存率分析表唯一标识不能为空"),
    SYSTEM_PERFORMANCEID_NOT_ID(100072,"系统性能监控表唯一标识不能为空"),
    SYSTEM_ALERTID_NOT_ID(100073, "异常报警记录表唯一标识不能为空"),
    STAT_STATISTICS_NOT_ID(100074, "销售数据统计表唯一标识不能为空"),
    SELLINGPRODUCTSID_NOT_ID(100075, "热销商品分析表唯一标识不能为空");

    //错误码
    private final Integer code;
    //错误码描述
    private final String description;

}
